﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class UserInfoMoment : MonoBehaviour
{
    public NetworkImage icon;
    public Text nameText;
    public GameObject manSign;
    public GameObject womanSign;
    public Text birthYear;
    public Text location;
    public Text edu;
    public Text job;

    // Start is called before the first frame update
    void Start()
    {
        
    }
    public void Init(MiniUserInfo userMoment)
    {
        icon.Init(userMoment.icon);
        nameText.text = userMoment.name;
        manSign.SetActive(userMoment.gender == Gender.man);
        manSign.SetActive(userMoment.gender == Gender.woman);
        birthYear.text = (userMoment.birthYear % 1900) + "年";
        location.text = userMoment.locationCity;
        edu.text = DataString.GetEducationString(userMoment.eduation);
        job.text = userMoment.job;
    }
        // Update is called once per frame
        void Update()
    {
        
    }
}
